package com.jacobson.core.widget.security.authc

import com.jacobson.core.widget.security.exception.AuthenticationException

/**
 * ================================================
 *  授权者
 *  @author Wucz on 2018/8/6 14:57
 * ================================================
 */
interface Authenticator {
    /**
     * 为Token授权
     * @param token Token
     * @return 成功授权返回授权结果信息
     * @throws AuthenticationException 授权异常-授权失败
     */
    @Throws(AuthenticationException::class)
    fun authenticate(token: AuthenticationToken): AuthenticationInfo

}